fix(init): skip interactive prompts when --resume is passed (closes #2098) - #2147
fix(init): skip interactive prompts when --resume is passed (closes #2098)#2147Larslllllll wants to merge 1 commit into
Conversation
…powise-dev#2098) When --resume is passed, the interactive gate was bypassed for the git-tier check but all other prompts (mode menu, provider selection, etc.) ran again. This changes the is_interactive expression to include `and not resume` so that resume runs fall through to the non-interactive path that reads stored configuration from .repowise/config.yaml and state.json. Also prints a one-line notice naming the mode being resumed so the user can confirm the run was picked up rather than restarted.
|
Thanks @Larslllllll, and sorry for the collision: #2106 was opened against #2098 two days before this and is already through review, so that is the one I am going to land. Nothing wrong with your read of the bug, you landed on the same one-line gate. Two differences worth knowing for next time, since neither is obvious from the issue. #2106 lifts the predicate out into a small If you want another one in the same area, #2137 is open and unassigned: I am leaving this open rather than closing it today: if #2106 goes quiet on the string change I asked for, yours is the fallback and I will merge it instead. Either way you will hear which on this thread. |
|
@Larslllllll, #2098 is fixed and closed, by #2106. As I said when you opened this, that one arrived on the issue first and carried tests, so it was the one I wanted to land; it went in a few minutes ago. Closing this as a duplicate rather than leaving it sitting red. To be fair to your version, it is the same one-line diagnosis and you got there independently on the same day. The thing #2106 adds is that it lifts the predicate out of the inline If you want another, #2137 is open, labelled |
|
Correction to what I wrote above, @Larslllllll: I pointed you at #2137 without checking it properly, and it was already claimed. @z2Ace0107 asked for it on 5 September with a scoped plan and had simply been waiting on a reply from us; I have assigned it to them. That was my error, not a change of mind, and I am sorry for sending you at something that was not free. Rather than hand you another one I have not checked, tell me roughly what you would like to work on, CLI, server, ingestion, or the web UI, and I will find you something genuinely unclaimed and confirm it is yours before you spend any time on it. You have now had two near-misses on this repo in one day and neither was your fault. |
Summary
When
repowise init --resumeis run on a TTY, the entire interactive questionnaire runs again (banner, mode menu, provider selection, etc.), defeating the purpose of--resume.The git-tier is already handled correctly by
effective_run_mode_for_resume()(computed before the interactive gate, so a fast resume never re-prompts for it). All other prompts were not similarly gated.Root cause
is_interactiveat line 1010 had no check forresume:Fix
and not resumeto theis_interactiveexpression, so resume runs always fall through to the non-interactive path.[dim]Resuming a full run — reusing stored configuration.[/dim]) so the user can see the run was picked up rather than restarted.The non-interactive path reads stored configuration from
.repowise/config.yamlandstate.json, so the prior run's provider, model, language, and other choices are reused automatically.Fixes #2098